Skip to content

fix: Prevent Lightbox navigation to open unsaved prompt - #7161

Open
Larsluph wants to merge 3 commits into
stashapp:developfrom
Larsluph:fix/lightbox-unsaved
Open

fix: Prevent Lightbox navigation to open unsaved prompt#7161
Larsluph wants to merge 3 commits into
stashapp:developfrom
Larsluph:fix/lightbox-unsaved

Conversation

@Larsluph

@Larsluph Larsluph commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds missing unsaved changes guard on the performer edit panel component and updates the existing rule for exclusion.

The new Regex handles both the old case and the new ones:

  • /${basepath}/${id} (gallery)
  • /${basepath}/${id}/default (performer/group)
  • /${basepath}/${id}/scenes (performer/group)
  • /${basepath}/${id}/galleries (performer)
  • /${basepath}/${id}/images (performer)
  • /${basepath}/${id}/groups (performer)
  • /${basepath}/${id}/appearswith (performer)
  • /${basepath}/${id}/performers (group)
  • /${basepath}/${id}/subgroups (group)

Identified from the validTabs const found in both edit panel.

Related Issue

Closes #7154

Testing

Testing was made beforehand to properly identify the issue and understand the app components contributing to the bug.
Applied the fix and tried opening the lightbox on all identified bugged page to make sure the lightbox hide action doesn't trigger the unsaved message on the performer and group detail page.
Also ensured the existing rule was still working on galleries.
Checked for other pages but no Lightbox can be natively opened there.

Screenshots

Checklist

  • I have read and understood the Contributing document.
  • I have read and understood the AI Usage Policy document.
  • I have made corresponding changes to the documentation (if applicable).

AI Usage Disclosure

  • I have used AI tools to assist with this pull request, and I have disclosed the tools and how I used them below.

I haven't used any AI tools for this.

Additional Context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lightbox back button behavior cause unsaved modal to show

1 participant